using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class itemgroupMap : EntityTypeConfiguration<itemgroup>
    {
        public itemgroupMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Symbol)
                .HasMaxLength(5);

            this.Property(t => t.Desc)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("itemgroup");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Symbol).HasColumnName("Symbol");
            this.Property(t => t.Desc).HasColumnName("Desc");
        }
    }
}
